package com.tracbds.core.bean;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 车辆定位数据实体类
 * @author lingx.com
 */
public class VehicleLocation {
    private String vehicleId;       // 车辆ID
    private Double latitude;        // 纬度
    private Double longitude;       // 经度
    @JSONField(format = "yyyy-MM-dd'T'HH:mm:ss")
    private Date uploadTime;        // 上传时间
    private Integer speed;          // 速度(km/h)
    private Integer direction;      // 方向

    public VehicleLocation() {
    }

    public VehicleLocation(String vehicleId, Double latitude, Double longitude, Date uploadTime, Integer speed, Integer direction) {
        this.vehicleId = vehicleId;
        this.latitude = latitude;
        this.longitude = longitude;
        this.uploadTime = uploadTime;
        this.speed = speed;
        this.direction = direction;
    }

    public String getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(String vehicleId) {
        this.vehicleId = vehicleId;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public Integer getSpeed() {
        return speed;
    }

    public void setSpeed(Integer speed) {
        this.speed = speed;
    }

    public Integer getDirection() {
        return direction;
    }

    public void setDirection(Integer direction) {
        this.direction = direction;
    }

    @Override
    public String toString() {
        return "VehicleLocation{" +
                "vehicleId='" + vehicleId + '\'' +
                ", latitude=" + latitude +
                ", longitude=" + longitude +
                ", uploadTime=" + uploadTime +
                ", speed=" + speed +
                ", direction=" + direction +
                '}';
    }
} 